#pragma once
#ifndef LOGIC_PROTO_BASE_H
#define LOGIC_PROTO_BASE_H

#include "ProtoDispatch.h"
#include "google/protobuf/message.h"

class LogicProtoBase
{
public:
	virtual ~ LogicProtoBase(){}

	//在这里，负责注册消息的回调函数，基类就不负责实现了
	virtual int RegProto() = 0;

	//这个是收到消息后，最外层的调用，内部调用注册号的回调函数
	virtual int OnMessage(Message * msg, void * param);

protected:
	Distpater _dispatch;
};

#endif //LOGIC_PROTO_BASE_H
